home *** CD-ROM | disk | FTP | other *** search
/ HAKERIS 11 / HAKERIS 11.ISO / linux / system / LinuxConsole 0.4 / linuxconsole0.4install-en.iso / guile0.4.lcm / share / guile / slib / pp.scm < prev    next >
Encoding:
Text File  |  2004-01-06  |  376 b   |  13 lines

  1. ;"pp.scm" Pretty-print
  2.  
  3. (require 'generic-write)
  4.  
  5. ; (pretty-print obj port) pretty prints 'obj' on 'port'.  The current
  6. ; output port is used if 'port' is not specified.
  7.  
  8. (define (pp:pretty-print obj . opt)
  9.   (let ((port (if (pair? opt) (car opt) (current-output-port))))
  10.     (generic-write obj #f 79 (lambda (s) (display s port) #t))))
  11.  
  12. (define pretty-print pp:pretty-print)
  13.